package com.atguigu.eduservice.controller;

import com.atguigu.common_uitls.R;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * zz: wzh
 * time 2022 09 20 16 50
 **/
@RestController
@RequestMapping("/eduservice/user")
@CrossOrigin
public class EduLoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @PostMapping("info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar"," ");
    }
}
